#ifndef INTERFACE_H
#define INTERFACE_H

#include <QWidget>
#include <QTcpSocket>
#include <QCloseEvent>
#include "jdtmypushbutton.h"

namespace Ui {
class Interface;
}

class Interface : public QWidget
{
    Q_OBJECT

public:
    explicit Interface(QWidget *parent = nullptr);
    ~Interface();
    void setClient(QTcpSocket* client);
    void closeEvent(QCloseEvent *event) override;
    void setLoginInterface(QWidget* w);
    void setLineEdit(QString str);
    void setLineEdit_bpm(QString str);
    void setLineEdit_errmsg(QString str);
    void setlabel_detected(int flag);
    void setlabel_lux(QString str);

private slots:
    void on_pushButton_tem_hum_clicked();

    void on_pushButton_fanon_clicked();

    void on_pushButton_fanoff_clicked();

    void on_pushButton_bpm_clicked();

private:
    Ui::Interface *ui;
    QTcpSocket* client;
    QWidget* loginInterface;
};

#endif // INTERFACE_H
